/**
 * org.assess.core.service.ServiceResult
 */
package org.assess.core.service;

/**
 * @description Service层处理结果
 * @author XiaLongxiang
 * @createtime 2012-5-31 下午5:43:24
 */
public enum ServiceResult {
    /**
     * 登录成功
     */
    login_success("SUCCESS"),

    /**
     * 登录失败，用户名密码不正确
     */
    login_error_username_password("LOGIN_ERROR_USERNAME_PASSWORD", "ST_LOGIN_ERROR_001"),
    
    /**
     * 登录失败，账户已冻结
     */
    login_error_freeze("LOGIN_ERROR_FREEZE", "ST_LOGIN_ERROR_002"),
    
    /**
     * 登录失败，服务器内部错误
     */
    login_error_server("LOGIN_ERROR_SERVER", "ST_LOGIN_ERROR_003"),
    
    /**
     * 信息保存成功
     */
    save_success("SAVE_SUCCESS"),
    
    /**
     * 信息保存失败-服务器内部错误
     */
    save_error_server("SAVE_ERROR_SERVER"),
    
    /**
     * 信息保存失败-编码重复
     */
    save_error_code_duplicate("SAVE_ERROR_CODE_DUPLICATE"),
    
    /**
     * 未知错误
     */
    error_unknown("ERROR_UNKNOWN", "G_SERVER_ERROR_000");
    
    private String value;
    
    private String message_code;
    
    private ServiceResult(String value) {
        this.value = value;
    }
    
    private ServiceResult(String value, String message_code) {
        this.value = value;
        this.message_code = message_code;
    }
    
    public String toString() {
        return value;
    }
    
    public String getValue() {
        return value;
    }
    
    public String getMessage_code() {
        return message_code;
    }
}
